package cn.jtfadmin.base.dict.service.impl;

import cn.jtfadmin.base.dict.annotations.handle.DictSerializer;
import cn.jtfadmin.base.dict.dto.DictItemModelDTO;
import cn.jtfadmin.base.dict.dto.DictModelDTO;
import cn.jtfadmin.base.dict.service.DictConfig;
import cn.jtfadmin.base.lang.config.ObjectMapperConfig;
import cn.jtfadmin.base.lang.enums.BooleanEnum;
import cn.jtfadmin.base.lang.enums.FileType;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import java.util.Arrays;
import java.util.List;

@Component
@Configuration
public class FileTypeDictConfig implements DictConfig {
    @Override
    public List<DictModelDTO> getInitDict() {
        return Arrays.asList(
                new DictModelDTO(FileType.class.getSimpleName(), "文件类型",
                        Arrays.asList(
                                new DictItemModelDTO(FileType.IMAGE.name(),"图片"),
                                new DictItemModelDTO(FileType.MUSIC.name(),"音频"),
                                new DictItemModelDTO(FileType.VIDEO.name(),"视频"),
                                new DictItemModelDTO(FileType.OFFICE_EXCEL.name(),"excel"),
                                new DictItemModelDTO(FileType.OFFICE_WORD.name(),"word"),
                                new DictItemModelDTO(FileType.TEXT.name(),"文本"),
                                new DictItemModelDTO(FileType.OTHER.name(),"其他"))
                        )
        );
    }

}
